{% extends "main/base.html" %}
{% load i18n static %}
{% block title %}{% trans '简单计算器' %}{% endblock %}
{% block this_css %}
{% endblock %}
{% block content %}
<div class="row">
    <div class="col-md-9">
        <section class="panel">
            <header class="panel-heading">
                    {% trans '简单计算' %}
            </header>
            <div class="panel-body">
                <form name="capacity_calculator" action="" method="get" class="form-horizontal">
                    <div class="form-group">
                        <div class="col-md-2"><label >{% trans "糖化批次容量/L" %}:</label></div>
                        <div class="col-md-3"><input type="number" name="batch_volume" class="form-control" maxlength="100" id="batch_volume"></div>
                        <div class="col-md-1"></div>
                        <div class="col-md-2"><label >{% trans "发酵罐总容量/L" %}:</label></div>
                        <div class="col-md-3"><input type="number" name="total_volume" class="form-control" maxlength="100" id="total_volume"></div>
                        <div class="col-md-1"></div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-2"><label >{% trans "发酵周期/天" %}:</label></div>
                        <div class="col-md-3"><input type="number" name="fermentation_period" class="form-control" value="20" id="fermentation_period"></div>
                        <div class="col-md-1"></div>
                        <div class="col-md-2"><label >{% trans "出酒率" %}:</label></div>
                        <div class="col-md-3"><input type="number" name="yield_ratio" class="form-control" value="0.85" id="yield_ratio"></div>
                        <div class="col-md-1"></div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-2"><label >{% trans "日均出酒量" %}:</label></div>
                        <div class="col-md-2"><input type="text" name="capacity_day" class="form-control" value="0" onfocus="this.blur();" /></div>
                        <div class="col-md-2"><label >{% trans "月均出酒量" %}:</label></div>
                        <div class="col-md-2"><input type="text" name="capacity_month" class="form-control" value="0" onfocus="this.blur();" /></div>
                        <div class="col-md-2"><label >{% trans "年均出酒量" %}:</label></div>
                        <div class="col-md-2"><input type="text" name="capacity_year" class="form-control" value="0" onfocus="this.blur();" /></div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-2"><label >{% trans "制冷机组/匹" %}:</label></div>
                        <div class="col-md-2"><input type="text" name="cooling_capacity" class="form-control" value="0" onfocus="this.blur();" /></div>
                        <div class="col-md-2"><label >{% trans "制冷机电功率" %}:</label></div>
                        <div class="col-md-2"><input type="text" name="cooling_power" class="form-control" value="0" onfocus="this.blur();" /></div>
                        <div class="col-md-2"><label >{% trans "蒸汽发生量（kg/h）" %}:</label></div>
                        <div class="col-md-2"><input type="text" name="steam_power" class="form-control" value="0" onfocus="this.blur();" /></div>
                    </div>
                    <div class="form-group" align="right">
                        <div class="col-md-12">
                            <div onclick="capacity();" class="btn btn-info" >{% trans "计算" %}</div>
                        </div>
                    </div>
                </form>
            </div>
        </section>
    </div>
    <div class="col-md-3">
        <div class="input-group">
            <input class="form-control" type="text" id="equipment_search" value="" placeholder="搜索设备" onchange="refreshBtn();">
            <span class="input-group-btn"><label class="btn btn-primary" id="search_btn" onclick="loadXMLDoc();">搜索</label></span>
        </div>
        <select name="equipment" class="selectpicker show-tick form-control" data-live-search="true" required id="id_equipment">
            <option value="" selected>---------</option>
        </select>
    </div>
</div>
{% endblock %}
{% block this_js %}
<script type="text/javascript" src="{% static 'main/js/calculate-main.js' %}"></script>
<script type="text/javascript" src="{% static 'main/js/load_equipment.js' %}"></script>
{% endblock %}
